package com.firewolf.fr.controller;

import java.util.Arrays;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class TestController {

	/**
	 * 通用请求，跳转页面即可
	 * @param model
	 * @return
	 */
	@RequestMapping("/test")
	public String test(Model model,HttpSession session,HttpServletRequest req) {
		model.addAttribute("user", "武松");
		model.addAttribute("users", Arrays.asList("林冲","卢俊义"));
		req.setAttribute("reqKey", "Request Value");
		session.setAttribute("sessionKey", "Session Value");
		return "test";
	}
}
